package com.chenshu.demo.mapper;

import com.chenshu.demo.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2023-12-23
 * Time：16:14
 */
@Mapper
public interface UserMapper {
    //查询所有的信息
    public List<User> getAll();

    public List<User> getAllByOrder(@Param("order")String order);

    //根据用户id查询
    public User getUserById(@Param("userId")Integer id);

    //根据UserName查询
    public User getUserByName(@Param("username")String username);

    //模糊查询
    public User getUserByLike(@Param("username") String username);

    public int add(@Param("username") String username, @Param("password") String password, @Param("gitUrl") String gitUrl);

    public int deleteByIds(@Param("ids") List<Integer> ids);
}
